summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-12-14 11:57:17 +0000
committerStephan Bergmann <sbergman@redhat.com>2016-12-14 11:57:17 +0000
commit17c7f703620f5c788322c45408236a04332e5c8b (patch)
tree4b772470b19084796d0d8692ce259eb64ebc2f57 /llvm/lib/AsmParser
parentf3ee444010a3fe11f1e631a10a6db4bde290b415 (diff)
downloadbcm5719-llvm-17c7f703620f5c788322c45408236a04332e5c8b.tar.gz
bcm5719-llvm-17c7f703620f5c788322c45408236a04332e5c8b.zip
Replace APFloatBase static fltSemantics data members with getter functions
At least the plugin used by the LibreOffice build (<https://wiki.documentfoundation.org/Development/Clang_plugins>) indirectly uses those members (through inline functions in LLVM/Clang include files in turn using them), but they are not exported by utils/extract_symbols.py on Windows, and accessing data across DLL/EXE boundaries on Windows is generally problematic. Differential Revision: https://reviews.llvm.org/D26671 llvm-svn: 289647
Diffstat (limited to 'llvm/lib/AsmParser')
-rw-r--r--llvm/lib/AsmParser/LLLexer.cpp14
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp6
2 files changed, 10 insertions, 10 deletions
diff --git a/llvm/lib/AsmParser/LLLexer.cpp b/llvm/lib/AsmParser/LLLexer.cpp
index ca30a4f1c78..bed5306cc07 100644
--- a/llvm/lib/AsmParser/LLLexer.cpp
+++ b/llvm/lib/AsmParser/LLLexer.cpp
@@ -876,7 +876,7 @@ lltok::Kind LLLexer::Lex0x() {
// HexFPConstant - Floating point constant represented in IEEE format as a
// hexadecimal number for when exponential notation is not precise enough.
// Half, Float, and double only.
- APFloatVal = APFloat(APFloat::IEEEdouble,
+ APFloatVal = APFloat(APFloat::IEEEdouble(),
APInt(64, HexIntToVal(TokStart + 2, CurPtr)));
return lltok::APFloat;
}
@@ -887,20 +887,20 @@ lltok::Kind LLLexer::Lex0x() {
case 'K':
// F80HexFPConstant - x87 long double in hexadecimal format (10 bytes)
FP80HexToIntPair(TokStart+3, CurPtr, Pair);
- APFloatVal = APFloat(APFloat::x87DoubleExtended, APInt(80, Pair));
+ APFloatVal = APFloat(APFloat::x87DoubleExtended(), APInt(80, Pair));
return lltok::APFloat;
case 'L':
// F128HexFPConstant - IEEE 128-bit in hexadecimal format (16 bytes)
HexToIntPair(TokStart+3, CurPtr, Pair);
- APFloatVal = APFloat(APFloat::IEEEquad, APInt(128, Pair));
+ APFloatVal = APFloat(APFloat::IEEEquad(), APInt(128, Pair));
return lltok::APFloat;
case 'M':
// PPC128HexFPConstant - PowerPC 128-bit in hexadecimal format (16 bytes)
HexToIntPair(TokStart+3, CurPtr, Pair);
- APFloatVal = APFloat(APFloat::PPCDoubleDouble, APInt(128, Pair));
+ APFloatVal = APFloat(APFloat::PPCDoubleDouble(), APInt(128, Pair));
return lltok::APFloat;
case 'H':
- APFloatVal = APFloat(APFloat::IEEEhalf,
+ APFloatVal = APFloat(APFloat::IEEEhalf(),
APInt(16,HexIntToVal(TokStart+3, CurPtr)));
return lltok::APFloat;
}
@@ -967,7 +967,7 @@ lltok::Kind LLLexer::LexDigitOrNegative() {
}
}
- APFloatVal = APFloat(APFloat::IEEEdouble,
+ APFloatVal = APFloat(APFloat::IEEEdouble(),
StringRef(TokStart, CurPtr - TokStart));
return lltok::APFloat;
}
@@ -1004,7 +1004,7 @@ lltok::Kind LLLexer::LexPositive() {
}
}
- APFloatVal = APFloat(APFloat::IEEEdouble,
+ APFloatVal = APFloat(APFloat::IEEEdouble(),
StringRef(TokStart, CurPtr - TokStart));
return lltok::APFloat;
}
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index d73818d2b86..d4de28e2c1f 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -4460,13 +4460,13 @@ bool LLParser::ConvertValIDToValue(Type *Ty, ValID &ID, Value *&V,
// The lexer has no type info, so builds all half, float, and double FP
// constants as double. Fix this here. Long double does not need this.
- if (&ID.APFloatVal.getSemantics() == &APFloat::IEEEdouble) {
+ if (&ID.APFloatVal.getSemantics() == &APFloat::IEEEdouble()) {
bool Ignored;
if (Ty->isHalfTy())
- ID.APFloatVal.convert(APFloat::IEEEhalf, APFloat::rmNearestTiesToEven,
+ ID.APFloatVal.convert(APFloat::IEEEhalf(), APFloat::rmNearestTiesToEven,
&Ignored);
else if (Ty->isFloatTy())
- ID.APFloatVal.convert(APFloat::IEEEsingle, APFloat::rmNearestTiesToEven,
+ ID.APFloatVal.convert(APFloat::IEEEsingle(), APFloat::rmNearestTiesToEven,
&Ignored);
}
V = ConstantFP::get(Context, ID.APFloatVal);
OpenPOWER on IntegriCloud