Make temporaries explicit to avoid premature
destruction of compiler-created ones.

llvm-svn: 42383
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp
index b96fbff..6fb5516 100644
--- a/llvm/lib/VMCore/AsmWriter.cpp
+++ b/llvm/lib/VMCore/AsmWriter.cpp
@@ -521,7 +521,9 @@
         Out << 'L';
       else
         assert(0 && "Unsupported floating point type");
-      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();
       uint64_t word = *p;
       int shiftcount=60;
       int width = CFP->getValueAPF().convertToAPInt().getBitWidth();