diff options
author | Dale Johannesen <dalej@apple.com> | 2007-09-26 23:20:33 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2007-09-26 23:20:33 +0000 |
commit | 693717fbe6d4e0f63bb9927229e26851e4744530 (patch) | |
tree | e58ba79eb59d3a41ea85479e75e40e24bf5f823f /lib/CodeGen/AsmPrinter.cpp | |
parent | 0e99c53f646eea27aae24fad47ff7d9554b88422 (diff) |
Make temporaries explicit to avoid premature
destruction of compiler-created ones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42383 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp index 521386b19f..88d21af054 100644 --- a/lib/CodeGen/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter.cpp @@ -876,7 +876,9 @@ void AsmPrinter::EmitGlobalConstant(const Constant *CV) { return; } else if (CFP->getType() == Type::X86_FP80Ty) { // all long double variants are printed as hex - const uint64_t *p = CFP->getValueAPF().convertToAPInt().getRawData(); + // api needed to prevent premature destruction + APInt api = CFP->getValueAPF().convertToAPInt(); + const uint64_t *p = api.getRawData(); if (TD->isBigEndian()) { O << TAI->getData16bitsDirective() << uint16_t(p[0] >> 48) << "\t" << TAI->getCommentString() |