commit 6234123172e67b055cd162e0ce37735f6c8445b7
parent 74496be25bca30715fa5fa0f272e46eb4489c35d
Author: Kyle Milz <kyle@0x30.net>
Date: Fri, 5 Aug 2016 17:25:16 -0600
src: check against citrun_major instead of hardcoded 0
Diffstat:
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Jamrules b/Jamrules
@@ -13,7 +13,7 @@ else {
# Try and respect this, {pkg,llvm}-config gives -O? too unfortunately
OPTIM = $(CFLAGS) ;
-C++FLAGS += -std=c++11 ;
+C++FLAGS += -std=c++11 -I$(TOP) ;
_CLANG_LIBS =
-lclangAST
diff --git a/src/Jamfile b/src/Jamfile
@@ -60,8 +60,7 @@ INST_SRCS =
Stringize runtime_h.h : $(TOP)/lib/runtime.h ;
ObjectC++Flags $(INST_SRCS) : `llvm-config --cxxflags` ;
-ObjectC++Flags $(INST_SRCS) : -I$(TOP)
- -DCITRUN_LIB=$(CITRUN_LIB)
+ObjectC++Flags $(INST_SRCS) : -DCITRUN_LIB=$(CITRUN_LIB)
-DCITRUN_PATH=$(CITRUN_PATH)
-DCITRUN_COVERAGE=$(CITRUN_COVERAGE) ;
diff --git a/src/runtime.cc b/src/runtime.cc
@@ -17,6 +17,7 @@
#include <err.h>
#include <fstream>
+#include "lib/runtime.h" // citrun_major
#include "runtime.hh"
RuntimeProcess::RuntimeProcess(af_unix &sock) :
@@ -29,7 +30,7 @@ RuntimeProcess::RuntimeProcess(af_unix &sock) :
// Protocol defined in lib/runtime.c send_static().
// This is the receive side of things.
m_socket.read_all(m_major);
- assert(m_major == 0);
+ assert(m_major == citrun_major);
m_socket.read_all(m_minor);
m_socket.read_all(m_num_tus);
m_socket.read_all(m_lines_total);