<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style><style type="text/css"></style><style type="text/css"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">If you're writing a pass for LLVM, you're going to need to follow the instructions here to include it into the build:
<div><a href="http://llvm.org/docs/WritingAnLLVMPass.html#quickstart" target="_blank" title="http://llvm.org/docs/WritingAnLLVMPass.html#quickstart
Cmd+Click to follow link">http://llvm.org/docs/WritingAnLLVMPass.html#quickstart</a></div>
<div><br>
</div>
<div>If you want to just want to see what a bytecode file looks like, write a standard 'Hello World' program and compile it with the command you were trying, but omitting the include path.</div>
<div><br>
</div>
<div>Hope that helps.</div>
<div>Sam</div>
<div><br>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF710389" style="direction: ltr; "><font face="Tahoma" size="2" color="#000000"><b>From:</b> cfe-dev-bounces@cs.uiuc.edu [cfe-dev-bounces@cs.uiuc.edu] on behalf of Era Jain [era@cse.iitk.ac.in]<br>
<b>Sent:</b> 21 October 2012 20:56<br>
<b>To:</b> cfe-dev@cs.uiuc.edu<br>
<b>Subject:</b> [cfe-dev] Problem in code generation with LLVM using clang<br>
</font><br>
</div>
<div></div>
<div>Hi,<br>
<br>
I am completely new to LLVM and to begin with, I am writing a basic pass(the Hello World Pass).<br>
I am trying to compile Hello.cpp using clang++ using the following command:<br>
<br>
>  <i>clang -S -emit-llvm -I/home/lera/llvm/include Hello.cpp -o Hello.bc</i><br>
 <br>
and get the following errors: <br>
<br>
<i>In file included from Hello.cpp:1:<br>
In file included from /home/era/llvm/include/llvm/Pass.h:373:<br>
In file included from /home/era/llvm/include/llvm/PassSupport.h:25:<br>
In file included from /home/era/llvm/include/llvm/PassRegistry.h:20:<br>
In file included from /home/era/llvm/include/llvm/ADT/StringRef.h:13:<br>
In file included from /home/era/llvm/include/llvm/Support/type_traits.h:20:<br>
/home/era/llvm/include/llvm/Support/DataTypes.h:49:3: error: "Must #define<br>
      __STDC_LIMIT_MACROS before #including Support/DataTypes.h"<br>
# error "Must #define __STDC_LIMIT_MACROS before #including Support/DataTypes.h"<br>
  ^<br>
/home/era/llvm/include/llvm/Support/DataTypes.h:53:3: error: "Must #define<br>
      __STDC_CONSTANT_MACROS before "         "#including Support/DataTypes.h"<br>
# error "Must #define __STDC_CONSTANT_MACROS before " \<br>
  ^<br>
In file included from Hello.cpp:2:<br>
In file included from /home/era/llvm/include/llvm/Function.h:24:<br>
In file included from /home/era/llvm/include/llvm/Argument.h:18:<br>
In file included from /home/era/llvm/include/llvm/Attributes.h:18:<br>
/home/era/llvm/include/llvm/Support/MathExtras.h:38:24: error: use of undeclared<br>
      identifier 'INT64_C'<br>
  return N >= 64 || (-(INT64_C(1)<<(N-1)) <= x && x < (INT64_C(1)<<(N-1)));<br>
                       ^<br>
/home/era/llvm/include/llvm/Support/MathExtras.h:38:56: error: use of undeclared<br>
      identifier 'INT64_C'<br>
  return N >= 64 || (-(INT64_C(1)<<(N-1)) <= x && x < (INT64_C(1)<<(N-1)));<br>
                                                       ^<br>
/home/era/llvm/include/llvm/Support/MathExtras.h:64:26: error: use of undeclared<br>
      identifier 'UINT64_C'<br>
  return N >= 64 || x < (UINT64_C(1)<<N);<br>
                         ^<br>
/home/era/llvm/include/llvm/Support/MathExtras.h:96:24: error: use of undeclared<br>
      identifier 'INT64_C'<br>
  return N >= 64 || (-(INT64_C(1)<<(N-1)) <= x && x < (INT64_C(1)<<(N-1)));<br>
                       ^<br>
/home/era/llvm/include/llvm/Support/MathExtras.h:96:56: error: use of undeclared<br>
      identifier 'INT64_C'<br>
  return N >= 64 || (-(INT64_C(1)<<(N-1)) <= x && x < (INT64_C(1)<<(N-1)));<br>
                                                       ^<br>
7 errors generated.<br>
<br>
</i>Can anyone help me with this?? Any help would be appreciated. Thanks!<br>
<br>
</div>
</div>
</div>
</body>
</html>