<div dir="ltr"><div>I'm running into build errors at current top of tree (r193132). Anyone else seeing these?</div><div><div><br></div></div><div><span style="font-family:'courier new',monospace">/home/mikesart/data/src/llvm.git/llvm/tools/lldb/source/Expression/IRForTarget.cpp:364:33: error: expected a class or namespace</span><br>
</div><div><div><font face="courier new, monospace"> if (fun->hasFnAttribute(Attribute::NoBuiltin)) {</font></div><div><font face="courier new, monospace"> ^</font></div><div><font face="courier new, monospace">/home/mikesart/data/src/llvm.git/llvm/tools/lldb/source/Expression/IRForTarget.cpp:364:33: error: reference to 'Attribute' is ambiguous</font></div>
<div><font face="courier new, monospace"> if (fun->hasFnAttribute(Attribute::NoBuiltin)) {</font></div><div><font face="courier new, monospace"> ^</font></div><div><font face="courier new, monospace">/home/mikesart/data/src/llvm.git/llvm/include/llvm/Support/Dwarf.h:144:6: note: candidate found by name lookup is 'llvm::dwarf::Attribute'</font></div>
<div><font face="courier new, monospace">enum Attribute LLVM_ENUM_INT_TYPE(uint16_t) {</font></div><div><font face="courier new, monospace"> ^</font></div><div><font face="courier new, monospace">/home/mikesart/data/src/llvm.git/llvm/include/llvm/IR/Attributes.h:45:7: note: candidate found by name lookup is 'llvm::Attribute'</font></div>
<div><font face="courier new, monospace">class Attribute {</font></div><div><font face="courier new, monospace"> ^</font></div><div><font face="courier new, monospace">/home/mikesart/data/src/llvm.git/llvm/tools/lldb/source/Expression/IRForTarget.cpp:365:13: error: reference to 'Attribute' is ambiguous</font></div>
<div><font face="courier new, monospace"> Attribute builtin = Attribute::get(fun->getContext(), Attribute::Builtin);</font></div><div><font face="courier new, monospace"> ^</font></div><div><font face="courier new, monospace">/home/mikesart/data/src/llvm.git/llvm/include/llvm/Support/Dwarf.h:144:6: note: candidate found by name lookup is 'llvm::dwarf::Attribute'</font></div>
<div><font face="courier new, monospace">enum Attribute LLVM_ENUM_INT_TYPE(uint16_t) {</font></div><div><font face="courier new, monospace"> ^</font></div><div><font face="courier new, monospace">/home/mikesart/data/src/llvm.git/llvm/include/llvm/IR/Attributes.h:45:7: note: candidate found by name lookup is 'llvm::Attribute'</font></div>
<div><font face="courier new, monospace">class Attribute {</font></div><div><font face="courier new, monospace"> ^</font></div><div><font face="courier new, monospace">/home/mikesart/data/src/llvm.git/llvm/tools/lldb/source/Expression/IRForTarget.cpp:369:72: error: use of undeclared identifier 'builtin'</font></div>
<div><font face="courier new, monospace"> call->removeAttribute(AttributeSet::FunctionIndex, builtin);</font></div><div><font face="courier new, monospace"> ^</font></div>
<div><font face="courier new, monospace">4 errors generated.</font></div></div><div><br></div><div>I can fix the errors by explicitly using the llvm namespace on Attribute. Ie:</div><div><br></div><div><div><div>diff --git a/source/Expression/IRForTarget.cpp b/source/Expression/IRForTarget.cpp</div>
<div>index cac3fdf..4d14ebd 100644</div><div>--- a/source/Expression/IRForTarget.cpp</div><div>+++ b/source/Expression/IRForTarget.cpp</div><div>@@ -361,8 +361,8 @@ IRForTarget::ResolveFunctionPointers(llvm::Module &llvm_module)</div>
<div> // be called with the builtin attribute on call sites. Remove any such</div><div> // attributes since it's illegal to have a builtin call to something</div><div> // other than a nobuiltin function.</div>
<div>- if (fun->hasFnAttribute(Attribute::NoBuiltin)) {</div><div>- Attribute builtin = Attribute::get(fun->getContext(), Attribute::Builtin);</div><div>+ if (fun->hasFnAttribute(llvm::Attribute::NoBuiltin)) {</div>
<div>+ llvm::Attribute builtin = llvm::Attribute::get(fun->getContext(), llvm::Attribute::Builtin);</div><div> </div><div> for (auto u = fun->use_begin(), e = fun->use_end(); u != e; ++u) {</div>
<div> if (auto call = dyn_cast<CallInst>(*u)) {</div></div></div><div><br></div><div>My compiler version:</div><div><br></div><div><div>mikesart@mikesart-rad:~/data/src/llvm.git/build$ g++ --version</div>
<div>clang version 3.3 (tags/RELEASE_33/final)</div><div>Target: x86_64-unknown-linux-gnu</div><div>Thread model: posix</div></div><div><br></div><div>Thanks.</div><div> -Mike</div></div>