This revision was automatically updated to reflect the committed changes.
Closed by commit rC331218: [MC] Change AsmParser to leverage Assembler during 
evaluation (authored by niravd, committed by ).
Herald added a subscriber: cfe-commits.

Changed prior to commit:
  https://reviews.llvm.org/D45164?vs=143128&id=144613#toc

Repository:
  rC Clang

https://reviews.llvm.org/D45164

Files:
  test/CodeGen/asm-parser-info.S
  tools/driver/cc1as_main.cpp


Index: test/CodeGen/asm-parser-info.S
===================================================================
--- test/CodeGen/asm-parser-info.S
+++ test/CodeGen/asm-parser-info.S
@@ -0,0 +1,12 @@
+// REQUIRES: x86-registered-target
+// RUN: %clang --target=x86_64-unknown-linux-gnu -c %s -o /dev/null
+
+// Check that cc1as can use assembler info in object generation.
+.data
+       
+foo:
+.if . - foo == 0
+    .byte 0xaa
+.else
+    .byte 0x00
+.endif
Index: tools/driver/cc1as_main.cpp
===================================================================
--- tools/driver/cc1as_main.cpp
+++ tools/driver/cc1as_main.cpp
@@ -435,6 +435,9 @@
     Str.get()->InitSections(Opts.NoExecStack);
   }
 
+  // Assembly to object compilation should leverage assembly info.
+  Str->setUseAssemblerInfoForParsing(true);
+
   bool Failed = false;
 
   std::unique_ptr<MCAsmParser> Parser(


Index: test/CodeGen/asm-parser-info.S
===================================================================
--- test/CodeGen/asm-parser-info.S
+++ test/CodeGen/asm-parser-info.S
@@ -0,0 +1,12 @@
+// REQUIRES: x86-registered-target
+// RUN: %clang --target=x86_64-unknown-linux-gnu -c %s -o /dev/null
+
+// Check that cc1as can use assembler info in object generation.
+.data
+	
+foo:
+.if . - foo == 0
+    .byte 0xaa
+.else
+    .byte 0x00
+.endif
Index: tools/driver/cc1as_main.cpp
===================================================================
--- tools/driver/cc1as_main.cpp
+++ tools/driver/cc1as_main.cpp
@@ -435,6 +435,9 @@
     Str.get()->InitSections(Opts.NoExecStack);
   }
 
+  // Assembly to object compilation should leverage assembly info.
+  Str->setUseAssemblerInfoForParsing(true);
+
   bool Failed = false;
 
   std::unique_ptr<MCAsmParser> Parser(
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to