diff options
| author | rajdakin <rajdakin@gmail.com> | 2024-09-06 15:07:38 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-06 15:07:38 +0200 |
| commit | 6044feb7fd58ff69f63f5418f516b1f3ded346e9 (patch) | |
| tree | 9935288f145df5b80f6d118c8a487b0a10afb1e8 /wrapperhelper/utils.h | |
| parent | 7dc59ac342d315dbb352becbeabc4e7057992de0 (diff) | |
| download | box64-6044feb7fd58ff69f63f5418f516b1f3ded346e9.tar.gz box64-6044feb7fd58ff69f63f5418f516b1f3ded346e9.zip | |
Wrapper helper (#1799)
* [WRAPPERHELPER] Added wrapperhelper v0.1, tested on libc * [WRAPPED] Removed updates to libc from this branch * [WRAPPERHELPER] Removed GPL header and added modified LGPL header, added notes about licensing issues
Diffstat (limited to 'wrapperhelper/utils.h')
| -rw-r--r-- | wrapperhelper/utils.h | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/wrapperhelper/utils.h b/wrapperhelper/utils.h deleted file mode 100644 index 06acbb72..00000000 --- a/wrapperhelper/utils.h +++ /dev/null @@ -1,33 +0,0 @@ -#pragma once -#include <clang/AST/ASTContext.h> -#include <clang/AST/Decl.h> -#include <clang/AST/Type.h> -#include <clang/Tooling/Tooling.h> -#include <clang/AST/RecordLayout.h> -#include <clang/AST/Decl.h> - -#include <llvm/ADT/Triple.h> -#include <llvm/Support/Casting.h> - -#include <cstddef> -#include <cstring> -#include <iostream> - -static const clang::Type* StripTypedef(clang::QualType type) { - if (type->isTypedefNameType()) { - return StripTypedef(type->getAs<clang::TypedefType>()->getDecl()->getUnderlyingType()); - } else { - return type.getTypePtr(); - } -} - -// FIXME: Need to support other triple except default target triple -static std::string GetDeclHeaderFile(clang::ASTContext& Ctx, clang::Decl* Decl) { - const auto& SourceManager = Ctx.getSourceManager(); - const clang::FileID FileID = SourceManager.getFileID(Decl->getBeginLoc()); - const clang::FileEntry *FileEntry = SourceManager.getFileEntryForID(FileID); - if (FileEntry) { - return FileEntry->getName().str(); - } - return ""; -} \ No newline at end of file |