[vmkit-commits] [vmkit] r75464 - /vmkit/trunk/lib/JnJVM/Compiler/JavaAOTCompiler.cpp

Nicolas Geoffray nicolas.geoffray at lip6.fr
Mon Jul 13 06:23:48 PDT 2009


Author: geoffray
Date: Mon Jul 13 08:23:46 2009
New Revision: 75464

URL: http://llvm.org/viewvc/llvm-project?rev=75464&view=rev
Log:
Bugfix with UTF8Buffer.


Modified:
    vmkit/trunk/lib/JnJVM/Compiler/JavaAOTCompiler.cpp

Modified: vmkit/trunk/lib/JnJVM/Compiler/JavaAOTCompiler.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Compiler/JavaAOTCompiler.cpp?rev=75464&r1=75463&r2=75464&view=diff

==============================================================================
--- vmkit/trunk/lib/JnJVM/Compiler/JavaAOTCompiler.cpp (original)
+++ vmkit/trunk/lib/JnJVM/Compiler/JavaAOTCompiler.cpp Mon Jul 13 08:23:46 2009
@@ -64,10 +64,10 @@
         Ty = JnjvmModule::JavaClassType->getContainedType(0); 
       }
     
-      const char* val = UTF8Buffer(classDef->name).toCompileName()->cString();
       GlobalVariable* varGV =
         new GlobalVariable(*getLLVMModule(), Ty, false,
-                           GlobalValue::ExternalLinkage, 0, val);
+                        GlobalValue::ExternalLinkage, 0,
+                        UTF8Buffer(classDef->name).toCompileName()->cString());
     
       nativeClasses.insert(std::make_pair(classDef, varGV));
 
@@ -95,10 +95,10 @@
       const llvm::Type* Ty = JnjvmModule::JavaClassArrayType;
       Module& Mod = *getLLVMModule();
     
-      const char* name = UTF8Buffer(classDef->name).toCompileName()->cString();
       GlobalVariable* varGV = 
         new GlobalVariable(Mod, Ty, false, GlobalValue::InternalLinkage,
-                           Mod.getContext().getNullValue(Ty), name);
+                        Mod.getContext().getNullValue(Ty),
+                        UTF8Buffer(classDef->name).toCompileName()->cString());
     
       arrayClasses.insert(std::make_pair(classDef->asArrayClass(), varGV));
       return varGV;





More information about the vmkit-commits mailing list