[llvm-commits] [llvm] r42736 - in /llvm/trunk: Xcode/LLVM.xcodeproj/project.pbxproj bindings/ocaml/llvm/llvm.ml bindings/ocaml/llvm/llvm.mli bindings/ocaml/llvm/llvm_ocaml.c include/llvm-c/Core.h lib/VMCore/Core.cpp test/Bindings/Ocaml/vmcore.ml

Evan Cheng evan.cheng at apple.com
Mon Oct 8 10:48:37 PDT 2007


Hi Gordon,


On Oct 7, 2007, at 10:31 AM, Gordon Henriksen wrote:
>
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/VMCore/Core.cpp (original)
> +++ llvm/trunk/lib/VMCore/Core.cpp Sun Oct  7 12:31:42 2007
> @@ -557,6 +557,17 @@
>   unwrap<GlobalVariable>(GlobalVar)->setThreadLocal(IsThreadLocal !=  
> 0);
> }
>
> +int LLVMIsGlobalConstant(LLVMValueRef GlobalVar) {
> +  bool res = unwrap<GlobalVariable>(GlobalVar)->isConstant();
> +  fprintf(stderr, "LLVMIsConstantGlobal(0x%08x) = %s\n",
> +                  (int) GlobalVar, res? "YES" : "NO");


This is breaking the build on 64-bit machine:
Core.cpp:567: error: cast from 'LLVMOpaqueValue*' to 'int' loses  
precision

Also, please don't leave debugging printf's in.

Thanks,

Evan

>
> +  return unwrap<GlobalVariable>(GlobalVar)->isConstant();
> +}
> +
> +void LLVMSetGlobalConstant(LLVMValueRef GlobalVar, int IsConstant) {
> +  unwrap<GlobalVariable>(GlobalVar)->setConstant(IsConstant != 0);
> +}
> +
> /*--.. Operations on  
> functions .............................................--*/




More information about the llvm-commits mailing list