summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/NativeFormatting.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-10-17 21:14:27 +0000
committerZachary Turner <zturner@google.com>2016-10-17 21:14:27 +0000
commit47e2c0a9cb03a4cb48af6d772e064037523485e3 (patch)
treedf5448529c693195cfd5b6409086e785168faaea /llvm/lib/Support/NativeFormatting.cpp
parent8716b3cbe0f47427f2a99755a1f6093b66a98391 (diff)
downloadbcm5719-llvm-47e2c0a9cb03a4cb48af6d772e064037523485e3.tar.gz
bcm5719-llvm-47e2c0a9cb03a4cb48af6d772e064037523485e3.zip
Try to fix build after invalid pointer conversion.
llvm-svn: 284428
Diffstat (limited to 'llvm/lib/Support/NativeFormatting.cpp')
-rw-r--r--llvm/lib/Support/NativeFormatting.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/lib/Support/NativeFormatting.cpp b/llvm/lib/Support/NativeFormatting.cpp
index bf54cde08b7..27410c18df5 100644
--- a/llvm/lib/Support/NativeFormatting.cpp
+++ b/llvm/lib/Support/NativeFormatting.cpp
@@ -353,6 +353,20 @@ void llvm::write_double(raw_ostream &S, double N, FloatStyle Style,
S << '%';
}
+IntegerStyle llvm::hexStyleToIntHexStyle(HexStyle S) {
+ switch (S) {
+ case HexStyle::Upper:
+ return IntegerStyle::HexUpperNoPrefix;
+ case HexStyle::Lower:
+ return IntegerStyle::HexLowerNoPrefix;
+ case HexStyle::PrefixUpper:
+ return IntegerStyle::HexUpperPrefix;
+ case HexStyle::PrefixLower:
+ return IntegerStyle::HexLowerPrefix;
+ }
+ LLVM_BUILTIN_UNREACHABLE;
+}
+
size_t llvm::getDefaultPrecision(FloatStyle Style) {
switch (Style) {
case FloatStyle::Exponent:
OpenPOWER on IntegriCloud