Skip to content

Commit

Permalink
Mnior edits due to clang-tidy.
Browse files Browse the repository at this point in the history
  • Loading branch information
mariaKt committed Dec 5, 2024
1 parent 7e0bfbd commit def7fdf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions include/kllvm/codegen/GCStrategy.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
// - pointers with address space != 0 are pointing to GC-managed memory.
//===----------------------------------------------------------------------===//

// NOLINTBEGIN

#ifndef LLVM_BACKEND_GC_STRATEGY_H
#define LLVM_BACKEND_GC_STRATEGY_H

Expand All @@ -27,3 +29,5 @@ class LLVMBackendGCStrategy: public llvm::GCStrategy {
} // end anonymous namespace

#endif // LLVM_BACKEND_GC_STRATEGY_H

// NOLINTEND
7 changes: 5 additions & 2 deletions lib/passes/GCStrategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
// - pointers with address space != 0 are pointing to GC-managed memory.
//===----------------------------------------------------------------------===//

// NOLINTBEGIN

#include "kllvm/codegen/GCStrategy.h"

#include "llvm/CodeGen/GCMetadata.h"
Expand All @@ -32,11 +34,12 @@ std::optional<bool> LLVMBackendGCStrategy::isGCManagedPointer(const Type *Ty) co
const PointerType *PTy = dyn_cast<PointerType>(Ty);
if (PTy->getAddressSpace()) {
return true;
} else {
return false;
}
return false;
}

// Add LLVMBackendGCStrategy to the global GCRegistry
static GCRegistry::Add<LLVMBackendGCStrategy> X("gcs-llvm-backend",
"GC Strategy for the LLVM Backend");

// NOLINTEND

0 comments on commit def7fdf

Please sign in to comment.