English 中文(简体)
履历表
原标题:LLVM bitcode does not find function

I went forward and compiled an existing c code via llvm-gcc -emit-llvm -c to llvm bitcode. The c program consisted of four modules which I built to one big bitcode each via llvm-ld. Then I tried to merge these 4 bitcode files to one via llvm-ld GE.bc GA.bc SD.bc SH.bc -o prog which works without complaint. Trying to execute the bitcode though it complains: LLVM ERROR: Program used external function myFunction which could not be resolved!

The thing is myFunction should be defined in SD.bc and used also in GA.bc. But it s not to find in SD.bc - does llvm-ld skip all definitions that are not used!?

我的非洲顾问办是林丹,我使用1.5万版本2.6。

问题回答

作为注1,第2.9版,接近3.0版。 你应该真正升级。





相关问题
Why I can t pass two chars as function arguments in C?

I have a function: int get_symbol(tab *tp, FILE *fp, char delim) and I call it like this: get_symbol(tp, fp, ; ) I always have it declared in the header as: int get_symbol(tab *, FILE *, char); ...

problem w/ linking static function g++

I am trying to build a small program and I have my own library libfoo. I have a camera class that is calling a static function from my Vector3 class (i.e. crossProduct). My camera class and Vector3 ...

taking java method names as function arg in clojure

All, I want to create a function that takes a symbol representing a java method and applies it to some object: (user=> (defn f [m] (. "foo" (m))) When I execute this, I get a result much ...

Def, Void, Function?

Recently, I ve been learning different programming langages, and come across many different names to initalize a function construct. For instance, ruby and python use the def keyword, and php and ...

热门标签