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 | ba4cc09f51eaf7bf7dff12bb4bb405caab3c29d1 (patch) | |
tree | d3cb20b6a959aec67805d5619906572c775cf5a3 /utils | |
parent | 53a58106d418db0acfe6a0c0821164158ed1ef2b (diff) | |
download | llvm-ba4cc09f51eaf7bf7dff12bb4bb405caab3c29d1.tar.gz llvm-ba4cc09f51eaf7bf7dff12bb4bb405caab3c29d1.tar.bz2 llvm-ba4cc09f51eaf7bf7dff12bb4bb405caab3c29d1.tar.xz |
Support var arg intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33962 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/FileLexer.l | 2 | ||||
-rw-r--r-- | utils/TableGen/IntrinsicEmitter.cpp | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/utils/TableGen/FileLexer.l b/utils/TableGen/FileLexer.l index cc6825f5e0..fa89b8ba04 100644 --- a/utils/TableGen/FileLexer.l +++ b/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/utils/TableGen/IntrinsicEmitter.cpp b/utils/TableGen/IntrinsicEmitter.cpp index 7cd03751de..9a1132a275 100644 --- a/utils/TableGen/IntrinsicEmitter.cpp +++ b/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")) |