[PATCH] D14047: [MC] Get rid of NDEBUG in headers
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 25 10:52:33 PDT 2015
davide created this revision.
davide added a reviewer: grosbach.
davide added a subscriber: llvm-commits.
Hope this is reasonable for you, Jim.
http://reviews.llvm.org/D14047
Files:
llvm/CodeGen/TargetSchedule.h
llvm/MC/MCSchedule.h
Index: llvm/MC/MCSchedule.h
===================================================================
--- llvm/MC/MCSchedule.h
+++ llvm/MC/MCSchedule.h
@@ -24,9 +24,7 @@
/// Define a kind of processor resource that will be modeled by the scheduler.
struct MCProcResourceDesc {
-#ifndef NDEBUG
const char *Name;
-#endif
unsigned NumUnits; // Number of resource of this kind
unsigned SuperIdx; // Index of the resources kind that contains this kind.
@@ -102,9 +100,7 @@
static const unsigned short InvalidNumMicroOps = UINT16_MAX;
static const unsigned short VariantNumMicroOps = UINT16_MAX - 1;
-#ifndef NDEBUG
- const char* Name;
-#endif
+ const char *Name;
unsigned short NumMicroOps;
bool BeginGroup;
bool EndGroup;
Index: llvm/CodeGen/TargetSchedule.h
===================================================================
--- llvm/CodeGen/TargetSchedule.h
+++ llvm/CodeGen/TargetSchedule.h
@@ -107,13 +107,12 @@
return SchedModel.getProcResource(PIdx);
}
-#ifndef NDEBUG
+ /// \brief Get the name of the resource (used for debugging purposes).
const char *getResourceName(unsigned PIdx) const {
if (!PIdx)
return "MOps";
return SchedModel.getProcResource(PIdx)->Name;
}
-#endif
typedef const MCWriteProcResEntry *ProcResIter;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14047.38350.patch
Type: text/x-patch
Size: 1304 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151025/b750d3cd/attachment.bin>
More information about the llvm-commits
mailing list