Skip to content

Commit

Permalink
[v0.0.3] Added test workaround for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
DronCode committed Mar 20, 2024
1 parent 865b76f commit 0811548
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions LLVM/source/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ namespace rg3::llvm
const clang::DeclContext* context = decl->getDeclContext();
while (context) {
if (const clang::NamespaceDecl* nsDecl = ::llvm::dyn_cast<clang::NamespaceDecl>(context)) {
#ifdef __APPLE__
// v0.0.3 workaround: I hate macOS for this. __1 inside namespace is an awful practice. So, I'm fixing that by this shitty fix, sorry :(
// !!! Pls, fix me later !!!
if (nsDecl->getName().str() == "__1")
{
context = context->getParent();
continue;
}
#endif

nameSpace.prepend(nsDecl->getName().str());
}
context = context->getParent();
Expand Down

0 comments on commit 0811548

Please sign in to comment.