Files
impala/testdata/llvm/test-loop.cc
Skye Wanderman-Milne c06e124dc2 Misc. codegen utilties
Added the ability to print a Value* in CodegenDebugTrace and a new
GetIntConstant() method to LlvmCodegen.

Change-Id: I15f23fc57a3045c856b2cf3de4e940718f7e44ec
Reviewed-on: http://gerrit.cloudera.org:8080/2049
Reviewed-by: Skye Wanderman-Milne <skye@cloudera.com>
Tested-by: Internal Jenkins
2016-02-10 04:44:31 +00:00

23 lines
562 B
C++

// Copyright (c) 2012 Cloudera, Inc. All right reserved.
// This is a test-only file. It was used to generate test-loop.bc
// which is used by the unit test to exercise loading precompiled
// ir.
#include <stdio.h>
__attribute__ ((noinline)) void DefaultImplementation() {
printf("Default\n");
}
void TestLoop(int n) {
for (int i = 0; i < n; ++i) {
DefaultImplementation();
}
}
// Unused function to make sure printf declaration is included in IR module. Used by
// LlvmCodegen::CodegenDebugTrace().
void printf_dummy_fn() {
printf("dummy");
}