[Lldb-commits] [lldb] r176368 - VC++ optimizer (in release mode) lost the EAX value in this function. Using a stack based array fixes it.

Carlo Kok ck at remobjects.com
Fri Mar 1 11:19:52 PST 2013


Author: carlokok
Date: Fri Mar  1 13:19:52 2013
New Revision: 176368

URL: http://llvm.org/viewvc/llvm-project?rev=176368&view=rev
Log:
VC++ optimizer (in release mode) lost the EAX value in this function. Using a stack based array fixes it.

Modified:
    lldb/branches/windows/source/Expression/IRForTarget.cpp

Modified: lldb/branches/windows/source/Expression/IRForTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Expression/IRForTarget.cpp?rev=176368&r1=176367&r2=176368&view=diff
==============================================================================
--- lldb/branches/windows/source/Expression/IRForTarget.cpp (original)
+++ lldb/branches/windows/source/Expression/IRForTarget.cpp Fri Mar  1 13:19:52 2013
@@ -325,9 +325,11 @@ IRForTarget::RegisterFunctionMetadata(LL
                 
         if (Instruction *user_inst = dyn_cast<Instruction>(user))
         {
-            Constant *name_array = ConstantDataArray::getString(context, StringRef(name));
+            Value *name_array[] = {
+                ConstantDataArray::getString(context, StringRef(name))
+            };
             
-            ArrayRef<Value *> md_values(name_array);
+            ArrayRef<Value *> md_values(name_array, 1);
             
             MDNode *metadata = MDNode::get(context, md_values);
             





More information about the lldb-commits mailing list