diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2003-06-17 23:55:35 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2003-06-17 23:55:35 +0000 |
commit | b471a23a8506b7476890ee34a25ffbd1b553f3ff (patch) | |
tree | 73f64f7db6a638536782801ef26a811dcec7644e /lib/VMCore | |
parent | 4399a4982ab8003a6009583b73a2aa38dedb6420 (diff) | |
download | llvm-b471a23a8506b7476890ee34a25ffbd1b553f3ff.tar.gz llvm-b471a23a8506b7476890ee34a25ffbd1b553f3ff.tar.bz2 llvm-b471a23a8506b7476890ee34a25ffbd1b553f3ff.tar.xz |
lib/CWriter/Writer.cpp: Copy AsmWriter's ConstantFP checking code here
into a new function FPCSafeToPrint(), and use it in printConstant()
and printFunction() to decide whether we should output ConstantFPs as
floating-point constants or as references to stack-allocated variables.
lib/VMCore/AsmWriter.cpp: Fix an apparent typo in the code mentioned above.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6762 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/AsmWriter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 7695fcb750..afc4b6d63c 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -234,7 +234,7 @@ static void WriteConstantInt(std::ostream &Out, const Constant *CV, // if ((StrVal[0] >= '0' && StrVal[0] <= '9') || ((StrVal[0] == '-' || StrVal[0] == '+') && - (StrVal[0] >= '0' && StrVal[0] <= '9'))) + (StrVal[1] >= '0' && StrVal[1] <= '9'))) // Reparse stringized version! if (atof(StrVal.c_str()) == CFP->getValue()) { Out << StrVal; return; |