diff options
author | Chris Lattner <sabre@nondot.org> | 2006-01-24 00:40:17 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-01-24 00:40:17 +0000 |
commit | 71cdba31774ce18ed32e89f1c6f7716ab923aa46 (patch) | |
tree | 67d3aa594dc3da11de807973c5f5b4ec7eacc4d1 | |
parent | 52599e17b17b7b5731bd8e23d6b768a318dc37d3 (diff) |
syntax change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25567 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/AsmParser/Lexer.l | 1 | ||||
-rw-r--r-- | lib/AsmParser/llvmAsmParser.y | 6 | ||||
-rw-r--r-- | lib/VMCore/AsmWriter.cpp | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/lib/AsmParser/Lexer.l b/lib/AsmParser/Lexer.l index 34aae99341..772023b420 100644 --- a/lib/AsmParser/Lexer.l +++ b/lib/AsmParser/Lexer.l @@ -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; } diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index f737bd02d1..1fd95f6dfb 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/lib/AsmParser/llvmAsmParser.y @@ -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!"); diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 43ecd3258a..d66497aed6 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -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"; } |