Skip to content

Commit

Permalink
fix compilation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rianquinn committed Feb 3, 2021
1 parent a957447 commit a37a095
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 5 deletions.
15 changes: 15 additions & 0 deletions BSL_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
### **Ubuntu Linux**
To compile the LLVM on Ubuntu (20.04 or higher) run the following:
```bash
git clone https://github.com/bareflank/llvm-project
mkdir llvm-project-build && cd llvm-project-build
cmake ../llvm-project/llvm -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld" -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_DOCS=OFF
```

### **Windows**
To compile the LLVM on Windows run the following:
```bash
git clone https://github.com/bareflank/llvm-project
mkdir llvm-project-build && cd llvm-project-build
cmake ../llvm-project/llvm -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld" -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_DOCS=OFF -Thost=x64
```
5 changes: 5 additions & 0 deletions clang-tools-extra/clang-tidy/ClangTidyForceLinker.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ extern volatile int BoostModuleAnchorSource;
static int LLVM_ATTRIBUTE_UNUSED BoostModuleAnchorDestination =
BoostModuleAnchorSource;

// This anchor is used to force the linker to link the BslModule.
extern volatile int BslModuleAnchorSource;
static int LLVM_ATTRIBUTE_UNUSED BslModuleAnchorDestination =
BslModuleAnchorSource;

// This anchor is used to force the linker to link the BugproneModule.
extern volatile int BugproneModuleAnchorSource;
static int LLVM_ATTRIBUTE_UNUSED BugproneModuleAnchorDestination =
Expand Down
3 changes: 0 additions & 3 deletions clang-tools-extra/clang-tidy/bsl/BslCheckUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
//===----------------------------------------------------------------------===//

#include "BslCheckUtils.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"

using namespace clang::ast_matchers;

Expand Down
7 changes: 7 additions & 0 deletions clang-tools-extra/clang-tidy/bsl/BslCheckUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BSL_CHECK_UTILS_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BSL_CHECK_UTILS_H

#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/Basic/AttrKinds.h"
#include "clang/Basic/CharInfo.h"
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Lex/Lexer.h"

namespace clang {
namespace tidy {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include <string>
#include <unordered_map>
#include <unordered_set>

using namespace clang::ast_matchers;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BSL_IDENTIFIERTYPOGRAPHICALLYUNAMBIGUOUSCHECK_H

#include "../ClangTidyCheck.h"
#include <unordered_map>
#include <list>

namespace clang {
namespace tidy {
Expand Down
1 change: 1 addition & 0 deletions clang-tools-extra/clang-tidy/bsl/OpLogicalPostfixCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "OpLogicalPostfixCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"

using namespace clang::ast_matchers;

Expand Down

0 comments on commit a37a095

Please sign in to comment.