[clang] [clang] Predefined macros for float128 support (PR #67196)
Pranav Kant via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 22 13:57:38 PDT 2023
https://github.com/pranavk created https://github.com/llvm/llvm-project/pull/67196
None
>From 8c07729b195fa78133258b03a31e8668d70a922d Mon Sep 17 00:00:00 2001
From: Pranav Kant <prka at google.com>
Date: Fri, 22 Sep 2023 20:50:32 +0000
Subject: [PATCH] [clang] Predefined macros for float128 support
---
clang/lib/Frontend/InitPreprocessor.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp
index e5db8a654e6707d..9e4d4d398a21da5 100644
--- a/clang/lib/Frontend/InitPreprocessor.cpp
+++ b/clang/lib/Frontend/InitPreprocessor.cpp
@@ -1076,6 +1076,8 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
DefineFloatMacros(Builder, "FLT", &TI.getFloatFormat(), "F");
DefineFloatMacros(Builder, "DBL", &TI.getDoubleFormat(), "");
DefineFloatMacros(Builder, "LDBL", &TI.getLongDoubleFormat(), "L");
+ if (TI.hasFloat128Type())
+ DefineFloatMacros(Builder, "FLT128", &TI.getFloat128Format(), "Q");
// Define a __POINTER_WIDTH__ macro for stdint.h.
Builder.defineMacro("__POINTER_WIDTH__",
More information about the cfe-commits
mailing list