syntax change
authorChris Lattner <sabre@nondot.org>
Tue, 24 Jan 2006 00:40:17 +0000 (00:40 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 24 Jan 2006 00:40:17 +0000 (00:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25567 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/Lexer.l
lib/AsmParser/llvmAsmParser.y
lib/VMCore/AsmWriter.cpp

index 34aae99341e5acb2b8551b26391e0268fc38db14..772023b4200b7cd7a2ea81f6f6cd98cd20c4bfb0 100644 (file)
@@ -212,6 +212,7 @@ big             { return BIG; }
 volatile        { return VOLATILE; }
 align           { return ALIGN;  }
 section         { return SECTION; }
+module          { return MODULE; }
 asm             { return ASM_TOK; }
 
 cc              { return CC_TOK; }
index f737bd02d1ded44ba6a5597d7a131cc552def1be..1fd95f6dfbff4e827236cab775e2658f002c614b 100644 (file)
@@ -967,7 +967,7 @@ Module *llvm::RunVMAsmParser(const char * AsmString, Module * M) {
 %token DECLARE GLOBAL CONSTANT SECTION VOLATILE
 %token TO DOTDOTDOT NULL_TOK UNDEF CONST INTERNAL LINKONCE WEAK  APPENDING
 %token OPAQUE NOT EXTERNAL TARGET TRIPLE ENDIAN POINTERSIZE LITTLE BIG ALIGN
-%token DEPLIBS CALL TAIL ASM_TOK
+%token DEPLIBS CALL TAIL ASM_TOK MODULE
 %token CC_TOK CCC_TOK FASTCC_TOK COLDCC_TOK
 %type <UIntVal> OptCallingConv
 
@@ -1571,7 +1571,7 @@ FunctionList : FunctionList Function {
   | FunctionList FunctionProto {
     $$ = $1;
   }
-  | FunctionList ASM_TOK AsmBlock {
+  | FunctionList MODULE ASM_TOK AsmBlock {
     $$ = $1;
   }  
   | FunctionList IMPLEMENTATION {
@@ -1612,7 +1612,7 @@ ConstPool : ConstPool OptAssign TYPE TypesV {
   }
   | ConstPool FunctionProto {       // Function prototypes can be in const pool
   }
-  | ConstPool ASM_TOK AsmBlock {    // Asm blocks can be in the const pool
+  | ConstPool MODULE ASM_TOK AsmBlock {  // Asm blocks can be in the const pool
   }
   | ConstPool OptAssign OptLinkage GlobalType ConstVal {
     if ($5 == 0) ThrowException("Global value initializer is not a constant!");
index 43ecd3258a979e03406107621be48613ed4d1214..d66497aed6a73e3169d2011c24bf5a8c5df60bd5 100644 (file)
@@ -776,7 +776,7 @@ void AssemblyWriter::printModule(const Module *M) {
     Out << "target triple = \"" << M->getTargetTriple() << "\"\n";
 
   if (!M->getInlineAsm().empty()) {
-    Out << "asm \"";
+    Out << "module asm \"";
     PrintEscapedString(M->getInlineAsm(), Out);
     Out << "\"\n";
   }