diff options
author | Tom Tromey <tromey@adacore.com> | 2025-03-31 08:42:21 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-31 07:42:21 -0700 |
commit | 68947342b75cc71f3ac9041d11db086d8d074336 (patch) | |
tree | 6d4946158557d3f22045393163d47e71f5745c66 /llvm/lib/AsmParser/LLLexer.cpp | |
parent | 4007de00a0574141695ace7a8d34aaf740a2c2e4 (diff) | |
download | llvm-68947342b75cc71f3ac9041d11db086d8d074336.zip llvm-68947342b75cc71f3ac9041d11db086d8d074336.tar.gz llvm-68947342b75cc71f3ac9041d11db086d8d074336.tar.bz2 |
Add support for fixed-point types (#129596)
This adds DWARF generation for fixed-point types. This feature is needed
by Ada.
Note that a pre-existing GNU extension is used in one case. This has
been emitted by GCC for years, and is needed because standard DWARF is
otherwise incapable of representing these types.
Diffstat (limited to 'llvm/lib/AsmParser/LLLexer.cpp')
-rw-r--r-- | llvm/lib/AsmParser/LLLexer.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/AsmParser/LLLexer.cpp b/llvm/lib/AsmParser/LLLexer.cpp index fd0a50d..4d25b12 100644 --- a/llvm/lib/AsmParser/LLLexer.cpp +++ b/llvm/lib/AsmParser/LLLexer.cpp @@ -1024,6 +1024,11 @@ lltok::Kind LLLexer::LexIdentifier() { return lltok::NameTableKind; } + if (Keyword == "Binary" || Keyword == "Decimal" || Keyword == "Rational") { + StrVal.assign(Keyword.begin(), Keyword.end()); + return lltok::FixedPointKind; + } + // Check for [us]0x[0-9A-Fa-f]+ which are Hexadecimal constant generated by // the CFE to avoid forcing it to deal with 64-bit numbers. if ((TokStart[0] == 'u' || TokStart[0] == 's') && |