Skip to content

Commit d076e96

Browse files
committed
CAS.o/FlatV1: Remove dead code for ForceDirectIndex
1 parent 2ae8bb7 commit d076e96

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

llvm/lib/CASObjectFormats/FlatV1.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -297,14 +297,14 @@ Expected<SectionRef> SectionRef::get(Expected<ObjectFormatNodeRef> Ref) {
297297
}
298298

299299
static Error encodeEdge(CompileUnitBuilder &CUB, SmallVectorImpl<char> &Data,
300-
const jitlink::Edge *E, bool ForceDirectIndex = false) {
300+
const jitlink::Edge *E) {
301301

302302
auto SymbolIndex = CUB.getSymbolIndex(E->getTarget());
303303
if (!SymbolIndex)
304304
return SymbolIndex.takeError();
305305

306306
unsigned IdxAndHasAddend = *SymbolIndex << 1 | (E->getAddend() != 0);
307-
if (!DirectIndexEncode && !ForceDirectIndex)
307+
if (!DirectIndexEncode)
308308
CUB.encodeIndex(IdxAndHasAddend);
309309
else
310310
encoding::writeVBR8(IdxAndHasAddend, Data);
@@ -316,10 +316,9 @@ static Error encodeEdge(CompileUnitBuilder &CUB, SmallVectorImpl<char> &Data,
316316

317317
static Error decodeEdge(LinkGraphBuilder &LGB, StringRef &Data,
318318
jitlink::Block &Parent, unsigned BlockIdx,
319-
const data::Fixup &Fixup,
320-
bool ForceDirectIndex = false) {
319+
const data::Fixup &Fixup) {
321320
unsigned SymbolIdx;
322-
if (!DirectIndexEncode && !ForceDirectIndex)
321+
if (!DirectIndexEncode)
323322
SymbolIdx = LGB.nextIdxForBlock(BlockIdx);
324323
else if (auto E = encoding::consumeVBR8(Data, SymbolIdx))
325324
return E;

0 commit comments

Comments
 (0)