[PATCH] D14645: [ARM, AArch64] Store source location for values in assembly files

Oliver Stannard via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 16 08:25:31 PST 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL253219: [ARM,AArch64] Store source location for values in assembly files (authored by olista01).

Changed prior to commit:
  http://reviews.llvm.org/D14645?vs=40129&id=40293#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14645

Files:
  llvm/trunk/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
  llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp
  llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
  llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp
  llvm/trunk/test/MC/AArch64/error-location.s
  llvm/trunk/test/MC/ARM/error-location.s

Index: llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp
===================================================================
--- llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp
+++ llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp
@@ -130,7 +130,7 @@
   /// if necessary.
   void EmitValueImpl(const MCExpr *Value, unsigned Size, SMLoc Loc) override {
     EmitDataMappingSymbol();
-    MCELFStreamer::EmitValueImpl(Value, Size);
+    MCELFStreamer::EmitValueImpl(Value, Size, Loc);
   }
 
 private:
Index: llvm/trunk/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
===================================================================
--- llvm/trunk/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+++ llvm/trunk/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
@@ -4131,7 +4131,7 @@
       if (getParser().parseExpression(Value))
         return true;
 
-      getParser().getStreamer().EmitValue(Value, Size);
+      getParser().getStreamer().EmitValue(Value, Size, L);
 
       if (getLexer().is(AsmToken::EndOfStatement))
         break;
Index: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
===================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -8801,7 +8801,7 @@
         return false;
       }
 
-      getParser().getStreamer().EmitValue(Value, Size);
+      getParser().getStreamer().EmitValue(Value, Size, L);
 
       if (getLexer().is(AsmToken::EndOfStatement))
         break;
Index: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp
===================================================================
--- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp
+++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp
@@ -513,7 +513,7 @@
         getContext().reportFatalError(Loc, "relocated expression must be 32-bit");
 
     EmitDataMappingSymbol();
-    MCELFStreamer::EmitValueImpl(Value, Size);
+    MCELFStreamer::EmitValueImpl(Value, Size, Loc);
   }
 
   void EmitAssemblerFlag(MCAssemblerFlag Flag) override {
Index: llvm/trunk/test/MC/ARM/error-location.s
===================================================================
--- llvm/trunk/test/MC/ARM/error-location.s
+++ llvm/trunk/test/MC/ARM/error-location.s
@@ -0,0 +1,5 @@
+@ RUN: not llvm-mc -triple armv7a--none-eabi -filetype obj < %s -o /dev/null 2>&1 | FileCheck %s
+
+  .text
+@ CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: symbol 'undef' can not be undefined in a subtraction expression
+  .word (0-undef)
Index: llvm/trunk/test/MC/AArch64/error-location.s
===================================================================
--- llvm/trunk/test/MC/AArch64/error-location.s
+++ llvm/trunk/test/MC/AArch64/error-location.s
@@ -0,0 +1,5 @@
+// RUN: not llvm-mc -triple aarch64--none-eabi -filetype obj < %s -o /dev/null 2>&1 | FileCheck %s
+
+  .text
+// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: symbol 'undef' can not be undefined in a subtraction expression
+  .word (0-undef)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14645.40293.patch
Type: text/x-patch
Size: 3062 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151116/1e12c80b/attachment.bin>


More information about the llvm-commits mailing list