aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/clangcodemodel/clangcodemodel.pro
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@qt.io>2016-05-10 15:10:15 +0200
committerNikolai Kosjar <nikolai.kosjar@qt.io>2017-02-24 11:12:15 +0000
commit07f4ae622770cc99782edc8bf14d2a385bf17778 (patch)
treecaba9398938abc3094cdb6ce9637c6bf53c41d78 /src/plugins/clangcodemodel/clangcodemodel.pro
parent74fb4bb0148ea8623dbcecd1fd704e99fb9a0ef6 (diff)
Clang: Add possibility to "pgo-train" libclang with a batch file
This allows to start Qt Creator in batch processing mode: $ export QTC_CLANG_BATCH=/path/to/file $ export QT_LOGGING_RULES=qtc.clangcodemodel.batch=true $ ./qtcreator -load ClangCodeModel The batch file will be executed and Qt Creator will exit. Advanced logging output can be activated as stated above. Note that it is required that the project was already configured/set up properly with the used settingspath, otherwise the wrong configuration will be taken or a pop-up dialog will block the execution. A small example follows that covers all the understood and so far needed batch file commands in order to train libclang for profile guided optimization. ${PWD} expands to the directory of the batch file. openProject "${PWD}/calendarwidget.pro" # Initial parsing openDocument "${PWD}/window.cpp" closeAllDocuments openDocument "${PWD}/window.cpp" # Reparse setCursor 478 1 insertText " " insertText " " insertText " " # Completion complete complete complete # Member completion insertText "comboBox->" complete complete complete # Wait in order to inspect the result processEvents 3000 Change-Id: Ib30526036f999e530f0c01d42a196a1e311e2c4c Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/clangcodemodel/clangcodemodel.pro')
-rw-r--r--src/plugins/clangcodemodel/clangcodemodel.pro4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/clangcodemodel/clangcodemodel.pro b/src/plugins/clangcodemodel/clangcodemodel.pro
index ef9302a1d1..3089483407 100644
--- a/src/plugins/clangcodemodel/clangcodemodel.pro
+++ b/src/plugins/clangcodemodel/clangcodemodel.pro
@@ -9,7 +9,9 @@ SOURCES += \
clangassistproposal.cpp \
clangassistproposalitem.cpp \
clangassistproposalmodel.cpp \
+ clangautomationutils.cpp \
clangbackendipcintegration.cpp \
+ clangbatchfileprocessor.cpp \
clangcodemodelplugin.cpp \
clangcompletionassistinterface.cpp \
clangcompletionassistprocessor.cpp \
@@ -39,7 +41,9 @@ HEADERS += \
clangassistproposal.h \
clangassistproposalitem.h \
clangassistproposalmodel.h \
+ clangautomationutils.h \
clangbackendipcintegration.h \
+ clangbatchfileprocessor.h \
clangcodemodelplugin.h \
clangcompletionassistinterface.h \
clangcompletionassistprocessor.h \