forked from qt-creator/qt-creator
preprocessor: add some helper function to dump Environment state
Change-Id: I5e1d549f96e899aadd5c94a5d7ef7f3169f45806 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
|
||||
#include "PreprocessorEnvironment.h"
|
||||
#include "Macro.h"
|
||||
#include <QDebug>
|
||||
#include <cstring>
|
||||
|
||||
using namespace CPlusPlus;
|
||||
@@ -272,3 +273,11 @@ void Environment::rehash()
|
||||
_hash[h] = m;
|
||||
}
|
||||
}
|
||||
|
||||
void Environment::dump() const
|
||||
{
|
||||
for (iterator it = firstMacro(); it != lastMacro(); ++it) {
|
||||
Macro *m = *it;
|
||||
qDebug() << m->decoratedName();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,6 +86,7 @@ public:
|
||||
void addMacros(const QList<Macro> ¯os);
|
||||
|
||||
static bool isBuiltinMacro(const ByteArrayRef &name);
|
||||
void dump() const;
|
||||
|
||||
private:
|
||||
static unsigned hashCode(const QByteArray &s);
|
||||
|
||||
Reference in New Issue
Block a user