[llvm-commits] CVS: llvm/docs/WritingAnLLVMPass.html
Devang Patel
dpatel at apple.com
Wed May 2 14:41:26 PDT 2007
Changes in directory llvm/docs:
WritingAnLLVMPass.html updated: 1.57 -> 1.58
---
Log message:
Use 'static const char' instead of 'static const int'.
Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.
---
Diffs of the changes: (+4 -4)
WritingAnLLVMPass.html | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
Index: llvm/docs/WritingAnLLVMPass.html
diff -u llvm/docs/WritingAnLLVMPass.html:1.57 llvm/docs/WritingAnLLVMPass.html:1.58
--- llvm/docs/WritingAnLLVMPass.html:1.57 Tue May 1 15:55:38 2007
+++ llvm/docs/WritingAnLLVMPass.html Wed May 2 16:39:18 2007
@@ -263,7 +263,7 @@
time.</p>
<div class="doc_code"><pre>
- static const int ID;
+ static const char ID;
Hello() : FunctionPass((intptr_t)&ID) {}
</pre></div><p>
@@ -285,7 +285,7 @@
function.</p>
<div class="doc_code"><pre>
- const int Hello::ID = 0;
+ const char Hello::ID = 0;
</pre></div>
<p> We initialize pass ID here. LLVM uses ID's address to identify pass so
@@ -311,7 +311,7 @@
<b>namespace</b> {
<b>struct Hello</b> : <b>public</b> <a href="#FunctionPass">FunctionPass</a> {
- static const int ID;
+ static const char ID;
Hello() : FunctionPass((intptr_t)&ID) {}
<b>virtual bool</b> <a href="#runOnFunction">runOnFunction</a>(Function &F) {
@@ -1807,7 +1807,7 @@
<a href="mailto:sabre at nondot.org">Chris Lattner</a><br>
<a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br>
- Last modified: $Date: 2007/05/01 20:55:38 $
+ Last modified: $Date: 2007/05/02 21:39:18 $
</address>
</body>
More information about the llvm-commits
mailing list