Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
Show First 20 Lines • Show All 3,510 Lines • ▼ Show 20 Lines | while (true) { | ||||
case bitc::FUNC_CODE_DEBUG_LOC: { // DEBUG_LOC: [line, col, scope, ia] | case bitc::FUNC_CODE_DEBUG_LOC: { // DEBUG_LOC: [line, col, scope, ia] | ||||
I = getLastInstruction(); | I = getLastInstruction(); | ||||
if (!I || Record.size() < 4) | if (!I || Record.size() < 4) | ||||
return error("Invalid record"); | return error("Invalid record"); | ||||
unsigned Line = Record[0], Col = Record[1]; | unsigned Line = Record[0], Col = Record[1]; | ||||
unsigned ScopeID = Record[2], IAID = Record[3]; | unsigned ScopeID = Record[2], IAID = Record[3]; | ||||
bool isImplicitCode = Record.size() == 5 && Record[4]; | |||||
MDNode *Scope = nullptr, *IA = nullptr; | MDNode *Scope = nullptr, *IA = nullptr; | ||||
if (ScopeID) { | if (ScopeID) { | ||||
Scope = MDLoader->getMDNodeFwdRefOrNull(ScopeID - 1); | Scope = MDLoader->getMDNodeFwdRefOrNull(ScopeID - 1); | ||||
if (!Scope) | if (!Scope) | ||||
return error("Invalid record"); | return error("Invalid record"); | ||||
} | } | ||||
if (IAID) { | if (IAID) { | ||||
IA = MDLoader->getMDNodeFwdRefOrNull(IAID - 1); | IA = MDLoader->getMDNodeFwdRefOrNull(IAID - 1); | ||||
if (!IA) | if (!IA) | ||||
return error("Invalid record"); | return error("Invalid record"); | ||||
} | } | ||||
LastLoc = DebugLoc::get(Line, Col, Scope, IA); | LastLoc = DebugLoc::get(Line, Col, Scope, IA, isImplicitCode); | ||||
I->setDebugLoc(LastLoc); | I->setDebugLoc(LastLoc); | ||||
I = nullptr; | I = nullptr; | ||||
continue; | continue; | ||||
} | } | ||||
case bitc::FUNC_CODE_INST_BINOP: { // BINOP: [opval, ty, opval, opcode] | case bitc::FUNC_CODE_INST_BINOP: { // BINOP: [opval, ty, opval, opcode] | ||||
unsigned OpNum = 0; | unsigned OpNum = 0; | ||||
Value *LHS, *RHS; | Value *LHS, *RHS; | ||||
▲ Show 20 Lines • Show All 2,427 Lines • Show Last 20 Lines |