[llvm] r251656 - clang-format lib/Transforms/Utils/AddDiscriminators.cpp
Dehao Chen via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 29 14:25:33 PDT 2015
Author: dehao
Date: Thu Oct 29 16:25:33 2015
New Revision: 251656
URL: http://llvm.org/viewvc/llvm-project?rev=251656&view=rev
Log:
clang-format lib/Transforms/Utils/AddDiscriminators.cpp
Modified:
llvm/trunk/lib/Transforms/Utils/AddDiscriminators.cpp
Modified: llvm/trunk/lib/Transforms/Utils/AddDiscriminators.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/AddDiscriminators.cpp?rev=251656&r1=251655&r2=251656&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/AddDiscriminators.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/AddDiscriminators.cpp Thu Oct 29 16:25:33 2015
@@ -70,14 +70,14 @@ using namespace llvm;
#define DEBUG_TYPE "add-discriminators"
namespace {
- struct AddDiscriminators : public FunctionPass {
- static char ID; // Pass identification, replacement for typeid
- AddDiscriminators() : FunctionPass(ID) {
- initializeAddDiscriminatorsPass(*PassRegistry::getPassRegistry());
- }
+struct AddDiscriminators : public FunctionPass {
+ static char ID; // Pass identification, replacement for typeid
+ AddDiscriminators() : FunctionPass(ID) {
+ initializeAddDiscriminatorsPass(*PassRegistry::getPassRegistry());
+ }
- bool runOnFunction(Function &F) override;
- };
+ bool runOnFunction(Function &F) override;
+};
}
char AddDiscriminators::ID = 0;
@@ -89,9 +89,9 @@ INITIALIZE_PASS_END(AddDiscriminators, "
// Command line option to disable discriminator generation even in the
// presence of debug information. This is only needed when debugging
// debug info generation issues.
-static cl::opt<bool>
-NoDiscriminators("no-discriminators", cl::init(false),
- cl::desc("Disable generation of discriminator information."));
+static cl::opt<bool> NoDiscriminators(
+ "no-discriminators", cl::init(false),
+ cl::desc("Disable generation of discriminator information."));
FunctionPass *llvm::createAddDiscriminatorsPass() {
return new AddDiscriminators();
@@ -159,8 +159,7 @@ bool AddDiscriminators::runOnFunction(Fu
// Simlarly, if the function has no debug info, do nothing.
// Finally, if this module is built with dwarf versions earlier than 4,
// do nothing (discriminator support is a DWARF 4 feature).
- if (NoDiscriminators ||
- !hasDebugInfo(F) ||
+ if (NoDiscriminators || !hasDebugInfo(F) ||
F.getParent()->getDwarfVersion() < 4)
return false;
More information about the llvm-commits
mailing list