IAS: Use the root macro instanciation for location
[oota-llvm.git] / lib / MC / MCParser / AsmParser.cpp
index 2245a466e62abbff5afa3bbde2ad6c3f0a556bbb..04d141389c923f1e815d8e1b8cddf4d86d83c4d7 100644 (file)
@@ -1646,8 +1646,8 @@ bool AsmParser::parseStatement(ParseStatementInfo &Info,
     if (ActiveMacros.empty())
       Line = SrcMgr.FindLineNumber(IDLoc, CurBuffer);
     else
-      Line = SrcMgr.FindLineNumber(ActiveMacros.back()->InstantiationLoc,
-                                   ActiveMacros.back()->ExitBuffer);
+      Line = SrcMgr.FindLineNumber(ActiveMacros.front()->InstantiationLoc,
+                                   ActiveMacros.front()->ExitBuffer);
 
     // If we previously parsed a cpp hash file line comment then make sure the
     // current Dwarf File is for the CppHashFilename if not then emit the