diff options
author | Jim Laskey <jlaskey@mac.com> | 2007-02-06 18:02:54 +0000 |
---|---|---|
committer | Jim Laskey <jlaskey@mac.com> | 2007-02-06 18:02:54 +0000 |
commit | 5aed30d5cf41ac0a10cc961ef815c1825c8b57d8 (patch) | |
tree | 655905753fbccdc39fb7ef8c3e041799d177f251 /llvm/utils | |
parent | 0e47295cf0c0ba1e559a4db30982881d1b247b3f (diff) | |
download | bcm5719-llvm-5aed30d5cf41ac0a10cc961ef815c1825c8b57d8.tar.gz bcm5719-llvm-5aed30d5cf41ac0a10cc961ef815c1825c8b57d8.zip |
Support var arg intrinsics.
llvm-svn: 33962
Diffstat (limited to 'llvm/utils')
-rw-r--r-- | llvm/utils/TableGen/FileLexer.l | 2 | ||||
-rw-r--r-- | llvm/utils/TableGen/IntrinsicEmitter.cpp | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/FileLexer.l b/llvm/utils/TableGen/FileLexer.l index cc6825f5e07..fa89b8ba04f 100644 --- a/llvm/utils/TableGen/FileLexer.l +++ b/llvm/utils/TableGen/FileLexer.l @@ -176,7 +176,7 @@ using namespace llvm; Comment \/\/.* -Identifier [a-zA-Z_][0-9a-zA-Z_]* +Identifier [a-zA-Z_][0-9a-zA-Z_]*|\.\.\. Integer [-+]?[0-9]+|0x[0-9a-fA-F]+|0b[01]+ CodeFragment \[\{([^}]+|\}[^\]])*\}\] StringVal \"[^"]*\" diff --git a/llvm/utils/TableGen/IntrinsicEmitter.cpp b/llvm/utils/TableGen/IntrinsicEmitter.cpp index 7cd03751de3..9a1132a2759 100644 --- a/llvm/utils/TableGen/IntrinsicEmitter.cpp +++ b/llvm/utils/TableGen/IntrinsicEmitter.cpp @@ -109,6 +109,11 @@ EmitIntrinsicToNameTable(const std::vector<CodeGenIntrinsic> &Ints, } static void EmitTypeVerify(std::ostream &OS, Record *ArgType) { + if (ArgType->getValueAsString("TypeVal") == "...") { + OS << "-2, "; + return; + } + OS << "(int)" << ArgType->getValueAsString("TypeVal") << ", "; // If this is an integer type, check the width is correct. if (ArgType->isSubClassOf("LLVMIntegerType")) |