[LLVMdev] [llvm-c]

Christian Budde Christian at savioursofsoul.de
Sat May 11 04:48:44 PDT 2013


a few days ago, I was trying to access the LLVM target registry via the
LLVM-C interface. Unfortunately I can't seem to get some useful
information out of it.

Despite the fact that the following code is written in Pascal, can you
please tell me if I have done something wrong here?

// initialize all targets / target information

// initialize native target in particular

// get first target
Target := LLVMGetFirstTarget;

// loop until the target is NULL
while (Target <> nil) do
  // get target name & description
  TargetName := LLVMGetTargetName(Target);
  TargetDescription := LLVMGetTargetDescription(Target);

  // do something with these information

  Target := LLVMGetNextTarget(Target);

By debugging the LLVM library (a custom DLL, which works fine
otherwise), I can see that there is no information, but I'm not that
deep into C and the LLVM structure to identify what went wrong. Also I
did a lot of tests the other day, trying several things without luck.

However, since I do not need this code at the moment, it's not urgent,
just felt to let you know about my problems.

Kind regards,


Christian-W. Budde
Eleonorenstr. 17
30449 Hannover
Tel.: +49 511 31048857
E-Mail: Christian at savioursofsoul.de
WWW: http://www.savioursofsoul.de/Christian

More information about the llvm-dev mailing list