forked from OSchip/llvm-project
[Modules] Fix potential ODR violations by sinking the DEBUG_TYPE
definition below all of the header #include lines, clang edition. If you want more details about this, you can see some of the commits to Debug.h in LLVM recently. This is just the clang section of a cleanup I've done for all uses of DEBUG_TYPE in LLVM. llvm-svn: 206849
This commit is contained in:
parent
f98597a163
commit
1034666777
|
@ -10,8 +10,6 @@
|
|||
// This file defines the AST-based CallGraph.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
#define DEBUG_TYPE "CallGraph"
|
||||
|
||||
#include "clang/Analysis/CallGraph.h"
|
||||
#include "clang/AST/ASTContext.h"
|
||||
#include "clang/AST/Decl.h"
|
||||
|
@ -22,6 +20,8 @@
|
|||
|
||||
using namespace clang;
|
||||
|
||||
#define DEBUG_TYPE "CallGraph"
|
||||
|
||||
STATISTIC(NumObjCCallEdges, "Number of Objective-C method call edges");
|
||||
STATISTIC(NumBlockCallEdges, "Number of block call edges");
|
||||
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
///
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define DEBUG_TYPE "format-token-breaker"
|
||||
|
||||
#include "BreakableToken.h"
|
||||
#include "clang/Basic/CharInfo.h"
|
||||
#include "clang/Format/Format.h"
|
||||
|
@ -22,6 +20,8 @@
|
|||
#include "llvm/Support/Debug.h"
|
||||
#include <algorithm>
|
||||
|
||||
#define DEBUG_TYPE "format-token-breaker"
|
||||
|
||||
namespace clang {
|
||||
namespace format {
|
||||
|
||||
|
|
|
@ -12,8 +12,6 @@
|
|||
///
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define DEBUG_TYPE "format-formatter"
|
||||
|
||||
#include "BreakableToken.h"
|
||||
#include "ContinuationIndenter.h"
|
||||
#include "WhitespaceManager.h"
|
||||
|
@ -23,6 +21,8 @@
|
|||
#include "llvm/Support/Debug.h"
|
||||
#include <string>
|
||||
|
||||
#define DEBUG_TYPE "format-formatter"
|
||||
|
||||
namespace clang {
|
||||
namespace format {
|
||||
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
///
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define DEBUG_TYPE "format-formatter"
|
||||
|
||||
#include "ContinuationIndenter.h"
|
||||
#include "TokenAnnotator.h"
|
||||
#include "UnwrappedLineParser.h"
|
||||
|
@ -31,6 +29,8 @@
|
|||
#include <queue>
|
||||
#include <string>
|
||||
|
||||
#define DEBUG_TYPE "format-formatter"
|
||||
|
||||
using clang::format::FormatStyle;
|
||||
|
||||
LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(std::string)
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
///
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define DEBUG_TYPE "format-parser"
|
||||
|
||||
#include "UnwrappedLineParser.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
|
||||
#define DEBUG_TYPE "format-parser"
|
||||
|
||||
namespace clang {
|
||||
namespace format {
|
||||
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
// This file reports various statistics about analyzer visitation.
|
||||
//===----------------------------------------------------------------------===//
|
||||
#define DEBUG_TYPE "StatsChecker"
|
||||
|
||||
#include "ClangSACheckers.h"
|
||||
#include "clang/AST/DeclObjC.h"
|
||||
#include "clang/Basic/SourceManager.h"
|
||||
|
@ -26,6 +24,8 @@
|
|||
using namespace clang;
|
||||
using namespace ento;
|
||||
|
||||
#define DEBUG_TYPE "StatsChecker"
|
||||
|
||||
STATISTIC(NumBlocks,
|
||||
"The # of blocks in top level functions");
|
||||
STATISTIC(NumBlocksUnreachable,
|
||||
|
|
|
@ -12,8 +12,6 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define DEBUG_TYPE "BugReporter"
|
||||
|
||||
#include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h"
|
||||
#include "clang/AST/ASTContext.h"
|
||||
#include "clang/AST/DeclObjC.h"
|
||||
|
@ -40,6 +38,8 @@
|
|||
using namespace clang;
|
||||
using namespace ento;
|
||||
|
||||
#define DEBUG_TYPE "BugReporter"
|
||||
|
||||
STATISTIC(MaxBugClassSize,
|
||||
"The maximum number of bug reports in the same equivalence class");
|
||||
STATISTIC(MaxValidBugClassSize,
|
||||
|
|
|
@ -12,8 +12,6 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define DEBUG_TYPE "CoreEngine"
|
||||
|
||||
#include "clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h"
|
||||
#include "clang/AST/Expr.h"
|
||||
#include "clang/AST/StmtCXX.h"
|
||||
|
@ -26,6 +24,8 @@
|
|||
using namespace clang;
|
||||
using namespace ento;
|
||||
|
||||
#define DEBUG_TYPE "CoreEngine"
|
||||
|
||||
STATISTIC(NumSteps,
|
||||
"The # of steps executed.");
|
||||
STATISTIC(NumReachedMaxSteps,
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define DEBUG_TYPE "ExprEngine"
|
||||
|
||||
#include "clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h"
|
||||
#include "PrettyStackTraceLocationContext.h"
|
||||
#include "clang/AST/CharUnits.h"
|
||||
|
@ -40,6 +38,8 @@ using namespace clang;
|
|||
using namespace ento;
|
||||
using llvm::APSInt;
|
||||
|
||||
#define DEBUG_TYPE "ExprEngine"
|
||||
|
||||
STATISTIC(NumRemoveDeadBindings,
|
||||
"The # of times RemoveDeadBindings is called");
|
||||
STATISTIC(NumMaxBlockCountReached,
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define DEBUG_TYPE "ExprEngine"
|
||||
|
||||
#include "clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h"
|
||||
#include "PrettyStackTraceLocationContext.h"
|
||||
#include "clang/AST/CXXInheritance.h"
|
||||
|
@ -28,6 +26,8 @@
|
|||
using namespace clang;
|
||||
using namespace ento;
|
||||
|
||||
#define DEBUG_TYPE "ExprEngine"
|
||||
|
||||
STATISTIC(NumOfDynamicDispatchPathSplits,
|
||||
"The # of times we split the path due to imprecise dynamic dispatch info");
|
||||
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define DEBUG_TYPE "AnalysisConsumer"
|
||||
|
||||
#include "clang/StaticAnalyzer/Frontend/AnalysisConsumer.h"
|
||||
#include "clang/AST/ASTConsumer.h"
|
||||
#include "clang/AST/DataRecursiveASTVisitor.h"
|
||||
|
@ -51,6 +49,8 @@ using namespace clang;
|
|||
using namespace ento;
|
||||
using llvm::SmallPtrSet;
|
||||
|
||||
#define DEBUG_TYPE "AnalysisConsumer"
|
||||
|
||||
static ExplodedNode::Auditor* CreateUbiViz();
|
||||
|
||||
STATISTIC(NumFunctionTopLevel, "The # of functions at top level.");
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define DEBUG_TYPE "format-test"
|
||||
|
||||
#include "FormatTestUtils.h"
|
||||
#include "clang/Format/Format.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#define DEBUG_TYPE "format-test"
|
||||
|
||||
namespace clang {
|
||||
namespace format {
|
||||
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define DEBUG_TYPE "format-test"
|
||||
|
||||
#include "FormatTestUtils.h"
|
||||
#include "clang/Format/Format.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#define DEBUG_TYPE "format-test"
|
||||
|
||||
namespace clang {
|
||||
namespace format {
|
||||
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define DEBUG_TYPE "format-test"
|
||||
|
||||
#include "FormatTestUtils.h"
|
||||
#include "clang/Format/Format.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#define DEBUG_TYPE "format-test"
|
||||
|
||||
namespace clang {
|
||||
namespace format {
|
||||
|
||||
|
|
Loading…
Reference in New Issue