summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-01-24 00:40:17 +0000
committerChris Lattner <sabre@nondot.org>2006-01-24 00:40:17 +0000
commit3acaf5cb1162f06eb9e3af44254f69f1066d46b3 (patch)
tree2b31d8e608a8a6a7350c29f68b059d9f8b729c56
parenta1280ad4d973ab4fb76f452fb6688d8cd974d28b (diff)
downloadbcm5719-llvm-3acaf5cb1162f06eb9e3af44254f69f1066d46b3.tar.gz
bcm5719-llvm-3acaf5cb1162f06eb9e3af44254f69f1066d46b3.zip
syntax change
llvm-svn: 25567
-rw-r--r--llvm/lib/AsmParser/Lexer.l1
-rw-r--r--llvm/lib/AsmParser/llvmAsmParser.y6
-rw-r--r--llvm/lib/VMCore/AsmWriter.cpp2
3 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/AsmParser/Lexer.l b/llvm/lib/AsmParser/Lexer.l
index 34aae99341e..772023b4200 100644
--- a/llvm/lib/AsmParser/Lexer.l
+++ b/llvm/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/llvm/lib/AsmParser/llvmAsmParser.y b/llvm/lib/AsmParser/llvmAsmParser.y
index f737bd02d1d..1fd95f6dfbf 100644
--- a/llvm/lib/AsmParser/llvmAsmParser.y
+++ b/llvm/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/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp
index 43ecd3258a9..d66497aed6a 100644
--- a/llvm/lib/VMCore/AsmWriter.cpp
+++ b/llvm/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";
}
OpenPOWER on IntegriCloud